# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: sh0 <mee@sh0.org>

pkgname=iptraf-ng
pkgver=1.2.1
pkgrel=1
pkgdesc='Console-based network monitoring utility'
url='https://github.com/iptraf-ng/iptraf-ng'
arch=('x86_64')
depends=('ncurses')
license=('GPL2')
replaces=('iptraf')
source=(${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
sha512sums=('44d36fc92cdbf379f62cb63638663c3ee610225b9c28d60ee55e62e358f398a6b0db281129327b3472e45fb553ee3dd605af09c129f2233f8839ae3dbd799384')
b2sums=('9b8df7fa24711b401464d492993b9c27424ec7ab6230218d1b792a66e5fb60c99b5cdb92ac1b5a6da578c4b10da79333f248f14d10e74057118aadf50263a4ed')

build() {
  cd ${pkgname}-${pkgver}
  make CFLAGS="${CFLAGS} -std=gnu99 -D_GNU_SOURCE" \
    LDFLAGS="${LDFLAGS}" \
    CPPFLAGS="${CPPFLAGS}" \
    sbindir_relative=bin \
    prefix=/usr
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" prefix=/usr sbindir_relative=bin install
  install -Dm 644 iptraf-ng-logrotate.conf -t "${pkgdir}/etc/logrotate.d"
}

# vim: ts=2 sw=2 et:
